const express = require("express");

const app = express();

// 引入拆分出去的 router 实例
const postsRouter = require("./routes/posts.js");
const usersRouter = require("./routes/users.js");

// 注册
app.use("/posts", postsRouter);
app.use("/users", usersRouter);

// RestfullAPI

app.listen(3000);
